package com.earl.eatbao.service;

import com.earl.eatbao.commons.service.BaseService;
import com.earl.eatbao.domain.eatbao.Shopper;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface ShopperService extends BaseService<Shopper, Long>{

	/**
	 * 用户是否是商家
	 * @param userId
	 * @return
	 */
	Boolean isShopper(Long userId);

	/**
	 * 查询所有的商家
	 * @return
	 */
	List<Shopper> findAllShoper();

    /**
     * 验证为商家
     * @param shopper
     * @param checkCode
     * @param backImg
     * @param fontImg
     * @return
     */
    Shopper beShopperApply(Shopper shopper, String checkCode, MultipartFile backImg, MultipartFile fontImg);

    /**
     * 根据商店名进行模糊查询
     * @param shopName
     * @return
     */
    List<Shopper> findShopperByName(String shopName);

    /**
     * 商家认证审失败
     * @param applyId
     */
    public Boolean failOnShopperApply(Long applyId);

    /**
     * 商家认证审核通过
     * @param applyId
     */
    Boolean successOnShopperApply(Long applyId);


    /**
     * 查询所用待审核的用户
     * @return
     */
    List<Shopper> findAllWaitApplyShopper();

    /**
     * 查看所用通过审核的商家
     * @return
     */
    List<Shopper> findAllPassApplyShopper();

    /**
     * 查看所用不通过审核的商家
     * @return
     */
    List<Shopper> findAllFailApplyShopper();


    /**
     * 通过用户ID获取商家
     * @param userId
     * @return
     */
    Shopper getBusinessStatus(Long userId);

    /**
     * 删除指定注册
     * @param id
     * @return
     */
    Boolean deleteShopperById(Long id);
}
